<template>
    <div id="user">
        <leftMenu />
        <div class="content">
            <RouterView></RouterView>
            <!-- <UserInfo/> -->
        </div>
    </div>
    <!-- <UserInfo />
    <UserOrder />  -->
</template>
<script setup>
import leftMenu from '@/components/user/leftMenu.vue';
import useUserStore from '@/store/modules/user';
import { getUserProfile } from "@/api/system/user";
import { ref, reactive } from 'vue'
const userStore =useUserStore();
const state = ref({
    user: {},
    roleGroup: {},
    postGroup: {}
});
function getUser() {
    getUserProfile().then(response => {
        state.value.user = response.data;
        userStore.avatar = state.value.user.avatar;
        userStore.name = state.value.user.userName;
        state.roleGroup = response.roleGroup;
        state.postGroup = response.postGroup;
    });
};

getUser();
</script>
<style scoped>
#user{
    display: flex;
}
.content{
    margin-top: 100px;
    width: 80vw;
    
    /* background-color: antiquewhite; */
}
</style>